<!doctype html>
<html>
<#include "../common/header.ftl">

<body>

<div id="wrapper" class="toggled">

    <#-- 侧边栏sidebar -->
    <#include "../common/nav.ftl">

    <#-- 主要内容区 -->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row clearfix">
            <#-- 订单id与订单金额 -->
                <div class="col-md-4 column">
                    <table class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>订单id</th>
                            <th>订单总金额</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>${orderDTO.orderId}</td>
                            <td>${orderDTO.orderAmount}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            <#-- 订单详情列表 -->
                <div class="col-md-12 column">
                    <table class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>商品id</th>
                            <th>商品名称</th>
                            <th>商品价格</th>
                            <th>商品数量</th>
                            <th>商品总价格</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#list orderDTO.orderDetailList as orderDetail>
                        <tr>
                            <td>${orderDetail.productId}</td>
                            <td>${orderDetail.productName}</td>
                            <td>${orderDetail.productPrice}</td>
                            <td>${orderDetail.productQuantity}</td>
                            <td>${orderDetail.productPrice * orderDetail.productQuantity}</td>
                        </tr>

                        </#list>
                        </tbody>
                    </table>
                </div>
            <#-- 订单操作 -->
                <div class="col-md-12 column">
                <#if orderDTO.getOrderStatusEnum().code == 0>
                    <a href="/seller/order/finish?orderId=${orderDTO.orderId}" type="button" class="btn btn-primary btn-default">完结订单</a>
                    <#if orderDTO.getOrderStatusEnum().code == 0 && orderDTO.getPayStatusEnum().code == 1>
                        <a href="/seller/order/cancel?orderId=${orderDTO.orderId}" type="button" class="btn btn-default btn-danger">取消订单</a>
                    </#if>
                </#if>
                </div>

            </div>
        </div>
    </div>


</div>



</body>
</html>